Optimal. Leaf size=64 \[ -\frac {c^2}{3 a x^3}+\frac {c (b c-2 a d)}{a^2 x}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{5/2} \sqrt {b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {472, 211}
\begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (b c-a d)^2}{a^{5/2} \sqrt {b}}+\frac {c (b c-2 a d)}{a^2 x}-\frac {c^2}{3 a x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 472
Rubi steps
\begin {align*} \int \frac {\left (c+d x^2\right )^2}{x^4 \left (a+b x^2\right )} \, dx &=\int \left (\frac {c^2}{a x^4}+\frac {c (-b c+2 a d)}{a^2 x^2}+\frac {(-b c+a d)^2}{a^2 \left (a+b x^2\right )}\right ) \, dx\\ &=-\frac {c^2}{3 a x^3}+\frac {c (b c-2 a d)}{a^2 x}+\frac {(b c-a d)^2 \int \frac {1}{a+b x^2} \, dx}{a^2}\\ &=-\frac {c^2}{3 a x^3}+\frac {c (b c-2 a d)}{a^2 x}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{5/2} \sqrt {b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 66, normalized size = 1.03 \begin {gather*} -\frac {c^2}{3 a x^3}-\frac {c (-b c+2 a d)}{a^2 x}+\frac {(-b c+a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{5/2} \sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 70, normalized size = 1.09
method | result | size |
default | \(\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{a^{2} \sqrt {a b}}-\frac {c^{2}}{3 a \,x^{3}}-\frac {c \left (2 a d -b c \right )}{a^{2} x}\) | \(70\) |
risch | \(\frac {-\frac {c \left (2 a d -b c \right ) x^{2}}{a^{2}}-\frac {c^{2}}{3 a}}{x^{3}}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (a^{5} \textit {\_Z}^{2} b +a^{4} d^{4}-4 a^{3} b c \,d^{3}+6 a^{2} b^{2} c^{2} d^{2}-4 a \,b^{3} c^{3} d +b^{4} c^{4}\right )}{\sum }\textit {\_R} \ln \left (\left (3 \textit {\_R}^{2} a^{5} b +2 a^{4} d^{4}-8 a^{3} b c \,d^{3}+12 a^{2} b^{2} c^{2} d^{2}-8 a \,b^{3} c^{3} d +2 b^{4} c^{4}\right ) x +\left (-d^{2} a^{5}+2 b c d \,a^{4}-b^{2} c^{2} a^{3}\right ) \textit {\_R} \right )\right )}{2}\) | \(192\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 70, normalized size = 1.09 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} - \frac {a c^{2} - 3 \, {\left (b c^{2} - 2 \, a c d\right )} x^{2}}{3 \, a^{2} x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.45, size = 190, normalized size = 2.97 \begin {gather*} \left [-\frac {3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-a b} x^{3} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 2 \, a^{2} b c^{2} - 6 \, {\left (a b^{2} c^{2} - 2 \, a^{2} b c d\right )} x^{2}}{6 \, a^{3} b x^{3}}, \frac {3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {a b} x^{3} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - a^{2} b c^{2} + 3 \, {\left (a b^{2} c^{2} - 2 \, a^{2} b c d\right )} x^{2}}{3 \, a^{3} b x^{3}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 172 vs.
\(2 (56) = 112\).
time = 0.42, size = 172, normalized size = 2.69 \begin {gather*} - \frac {\sqrt {- \frac {1}{a^{5} b}} \left (a d - b c\right )^{2} \log {\left (- \frac {a^{3} \sqrt {- \frac {1}{a^{5} b}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{a^{5} b}} \left (a d - b c\right )^{2} \log {\left (\frac {a^{3} \sqrt {- \frac {1}{a^{5} b}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {- a c^{2} + x^{2} \left (- 6 a c d + 3 b c^{2}\right )}{3 a^{2} x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 72, normalized size = 1.12 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {3 \, b c^{2} x^{2} - 6 \, a c d x^{2} - a c^{2}}{3 \, a^{2} x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 90, normalized size = 1.41 \begin {gather*} \frac {b\,c^2}{a^2\,x}-\frac {c^2}{3\,a\,x^3}+\frac {b^{3/2}\,c^2\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{a^{5/2}}+\frac {d^2\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {b}}-\frac {2\,c\,d}{a\,x}-\frac {2\,\sqrt {b}\,c\,d\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________